/**
 * 
 */
package net.teamix.Utils;

import java.util.Map;

import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;

/**
 * @author shari
 * 
 */
public class FacesUtil {

	// Getters
	// -----------------------------------------------------------------------------------

	public static String getRequestParameter(String name) {
		Map map = FacesContext.getCurrentInstance().getExternalContext()
		.getRequestParameterMap();
		return (String) FacesContext.getCurrentInstance().getExternalContext()
				.getRequestParameterMap().get(name);
	}

	public static String getActionAttribute(ActionEvent event, String name) {
		return (String) event.getComponent().getAttributes().get(name);
	}

}
